Repository navigation
Fail config tables and parsed path-tables on a folder that cannot be listed - #1763
Merged
Merged
Conversation
A config table's build and a parsed path-table's query now fail naming the folder; a missing folder still holds nothing. Streamed path-tables and the watcher's rescans still skip it.
thekevinbot
marked this pull request as ready for review
November 18, 2026 17:00
…older-fails-1118 # Conflicts: # packages/rust/src/scanner.rs
This was referenced Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1767
Part one of #1740. A folder a glob reaches that exists but cannot be listed (its open fails, or a read fails part-way) now fails:
cannot list folder '<path>': <reason>. This isDirSqlError::Io, carrying the OS error kind.--on-file/path_table_parser): the query fails with the same message.This covers a literal path inside such a folder, per the ruling. A folder that does not exist, or a path that is a file ("Not a directory"), still holds nothing.
Out of scope, per the maintainer:
RowStream. That is PR 2, which will close A folder that cannot be listed is treated as empty and the query succeeds #1740.docs/reference/glob.mdlists the departure from bash as theunlistabledivergence.agents/reference/product-principles.mdlists it too.Red
The Rust integration tests job 134959810456 failed on red commit
dc02b748. Three tests failed:a_parsed_path_table_over_an_unlistable_folder_fails_naming_it:an unlistable folder must fail the query: [{"k": Text("a")}]a_parsed_literal_path_inside_an_unlistable_folder_fails_naming_it:parser produced no rows forb.ndjson``a_config_table_through_a_link_to_an_unlistable_folder_fails_its_build_naming_it:an unlistable folder must fail the buildManual exercise
On a tree with
data/open/a.ndjsonanddata/locked(chmod 311):dirsql --on-file cat "SELECT * FROM './data/**/*.ndjson'"exits 1 withcannot list folder '/tmp/hand1740/data/locked': Permission denied (os error 13)../data/locked/b.ndjsonfails the same way../data/{open,missing}/*.ndjsonexits 0 and returns[{"k":1}].failed to load config: cannot list folder '.../idx/link'.E2E Verification
testing-conventions e2e attest 'uv run python -m pytest tests/e2e/on_file_query_test.py tests/e2e/on_file_failure_test.py tests/e2e/query_contract_test.py tests/e2e/glob_speed_recursive_test.py tests/e2e/glob_speed_symlink_test.py tests/e2e/many_dirs_speed_test.py tests/e2e/parent_then_child_test.py -x -q'. Result: 23 passed; receipt committed.just e2e-attest-ts. Result: passed; receipt committed.cargo test -p dirsql --features clipasses, with one exception:tests/non_utf8_names.rscannot create its fixture on this host's tmpfs (EILSEQ). That fixture failure predates this change.Changelog / Migrations
packages/rust/changelog.d/2026-11-18-unlistable-folder-fails.mdpackages/rust/migrations.d/2026-11-18-unlistable-folder-fails.md(scan_directory_reporting,scan_globandscan_glob_checking_rootnow returnResult)